home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / utils1 / eqo10.arj / EQO.DOC next >
Text File  |  1994-03-05  |  36KB  |  930 lines

  1.  
  2.  
  3.    EQO.DOC                                                        05-Mar-1994
  4.                              ╔═══════════════════╗
  5.                          ────╢  EQO version 1.0  ╟────
  6.                     ═════════╣ ───────────────── ╠═════════
  7.                          ────╢ by Jeremy Sawicki ╟────
  8.                              ╚═══════════════════╝
  9.  
  10.                       "The DOS ECHO command replacement."
  11.  
  12.  ┌──────────────────
  13.  │ TABLE OF CONTENTS ║
  14.    ══════════════════╝
  15.  
  16.    DISCLAIMER / LEGAL INFORMATION  . . . . . . . . . . . . . . . . . . . .  2
  17.  
  18.    THE SHAREWARE CONCEPT . . . . . . . . . . . . . . . . . . . . . . . . .  2
  19.       Distribution Information . . . . . . . . . . . . . . . . . . . . . .  3
  20.       Commercial Use Policy  . . . . . . . . . . . . . . . . . . . . . . .  3
  21.  
  22.    PURPOSE OF THE PROGRAM  . . . . . . . . . . . . . . . . . . . . . . . .  3
  23.  
  24.    QUICK START . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  25.  
  26.    HOW TO USE THE PROGRAM  . . . . . . . . . . . . . . . . . . . . . . . .  4
  27.  
  28.    SPECIAL CODES                                                            5
  29.       $$    Dollar sign  . . . . . . . . . . . . . . . . . . . . . . . . .  5
  30.       $G    Greater-than sign  . . . . . . . . . . . . . . . . . . . . . .  5
  31.       $L    Less-than sign . . . . . . . . . . . . . . . . . . . . . . . .  5
  32.       $B    Pipe symbol  . . . . . . . . . . . . . . . . . . . . . . . . .  6
  33.       $Q    Equal sign . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  34.       $T    Current time . . . . . . . . . . . . . . . . . . . . . . . . .  6
  35.       $D    Current date . . . . . . . . . . . . . . . . . . . . . . . . .  6
  36.       $P    Current drive and path . . . . . . . . . . . . . . . . . . . .  7
  37.       $N    Current drive  . . . . . . . . . . . . . . . . . . . . . . . .  7
  38.       $V    DOS version number . . . . . . . . . . . . . . . . . . . . . .  7
  39.       $H    Backspace (erase previous character) . . . . . . . . . . . . .  8
  40.       $E    Escape (ASCII code 27) . . . . . . . . . . . . . . . . . . . .  8
  41.       $_    Carriage return and line feed  . . . . . . . . . . . . . . . .  8
  42.       $^    Any control character  . . . . . . . . . . . . . . . . . . . .  9
  43.       $###  Any ASCII code (decimal) . . . . . . . . . . . . . . . . . . .  9
  44.       $X##  Any ASCII code (hexadecimal) . . . . . . . . . . . . . . . . .  9
  45.       $;    No carriage return / line feed . . . . . . . . . . . . . . . . 10
  46.       
  47.    EXAMPLES                                                                10
  48.       DOS Piping Capabilities  . . . . . . . . . . . . . . . . . . . . . . 10
  49.       Keeping a Log File . . . . . . . . . . . . . . . . . . . . . . . . . 11
  50.       Using ANSI Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  51.       Changing Colors (ANSI) . . . . . . . . . . . . . . . . . . . . . . . 12
  52.       Redefining Keys (ANSI) . . . . . . . . . . . . . . . . . . . . . . . 14
  53.  
  54.    FINAL WORD  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
  55.  
  56.    ──────────────────────────────────────────────────────────────────────────
  57.    EQO version 1.0 - by Jeremy Sawicki                   TABLE OF CONTENTS  1
  58.    ──────────────────────────────────────────────────────────────────────────
  59.  
  60.  
  61.  
  62.  ┌───────────────────────────────
  63.  │ DISCLAIMER / LEGAL INFORMATION ║
  64.    ═══════════════════════════════╝
  65.  
  66.       This program  and the  accompanying documentation  are provided  AS IS,
  67.    with no  warranty of  any kind,  expressed or  implied, including  but not
  68.    limited  to  warranties  of  merchantability,  fitness  for  a  particular
  69.    purpose, or  functionality.  Under  no conditions  will Jeremy  Sawicki be
  70.    liable for any damages whatsoever that may result, directly or indirectly,
  71.    from the use or inability to use this software or documentation.
  72.  
  73.       By possessing and/or using a copy of EQO,  you agree to the above terms
  74.    and conditions.
  75.  
  76.       Trademarks mentioned  in this  documentation appear  for identification
  77.    purposes only and are the property of their respective companies.
  78.  
  79.       (And now, on to more important things...)
  80.  
  81.  
  82.  ┌──────────────────────
  83.  │ THE SHAREWARE CONCEPT ║
  84.    ══════════════════════╝
  85.  
  86.       EQO is being distributed under the  shareware concept.  This means that
  87.    it may be freely distributed (see Distribution Information below) in order
  88.    to give users a chance to try the program without paying any money for it.
  89.  
  90.       Typically, shareware  authors give users  a trial period  (30 days, for
  91.    example) during which time  they may try the program  out and evaluate its
  92.    usefulness.  If after that time they decide to continue using the program,
  93.    they must "register" the program by sending money to the author.
  94.  
  95.       Unlike  many  shareware programs,  EQO  version  1.0  currently  has no
  96.    "required" registration fee.   However, donations are  always welcome.  If
  97.    you find EQO  useful, interesting,  or entertaining - or  if you just have
  98.    some spare cash lying around - a voluntary donation of any amount ($5 U.S.
  99.    suggested) would be greatly appreciated.  With enough user support, I will
  100.    be able  to produce  newer, better  versions of  this and  other shareware
  101.    programs in the future.
  102.  
  103.       Send  any  contributions  or  other  correspondence  to  the  following
  104.    address:
  105.  
  106.          Jeremy Sawicki
  107.          523 Kapity Dr.
  108.          Mogadore, OH  44260-9534
  109.  
  110.  
  111.  
  112.  
  113.  
  114.    ──────────────────────────────────────────────────────────────────────────
  115.    EQO version 1.0 - by Jeremy Sawicki      DISCLAIMER / LEGAL INFORMATION  2
  116.    ──────────────────────────────────────────────────────────────────────────
  117.  
  118.  
  119.  
  120.       Electronic  mail can be  sent to the  author at the  following Internet
  121.    addresses:
  122.  
  123.          at869@cleveland.freenet.edu  (preferred)
  124.          jsawicki@nyx.cs.du.edu       (alternate)
  125.          71321.3301@compuserve.com    (alternate)
  126.  
  127.       When writing,  why not  tell me a  little about  your use  of EQO?  For
  128.    example, where did you  get your copy?  What do  you use it for primarily?
  129.    What features do you like the  most, and what others would you like to see
  130.    added?  Any  comments would  be welcome,  as they  may help me  to improve
  131.    future versions of the program.
  132.  
  133.  
  134.  Distribution Information
  135.  ────────────────────────
  136.  
  137.       EQO may be freely copied and distributed, as long as it is not modified
  138.    in any way, and this documentation is always included with the executable.
  139.    It may be uploaded to electronic bulletin boards or Internet FTP sites.  A
  140.    reasonable  fee  may  be  charged  to  cover  the  costs  of  copying  and
  141.    distribution.  To prevent multiple  copies of the program from existing on
  142.    the same system under different names, you are encouraged to distribute it
  143.    under the name EQO10.ZIP (or other suitable extension).
  144.  
  145.  
  146.  Commercial Use Policy
  147.  ─────────────────────
  148.  
  149.       EQO may  not be  used  for any  commercial  purposes  without  my prior
  150.    express written permission.   EQO may not be distributed  for use with any
  151.    for-profit products without my prior express written permission.
  152.  
  153.       If you are  interested in using  EQO in a commercial  environment or as
  154.    part of a  for-profit product,  contact the  author through  electronic or
  155.    standard paper mail (see above) to make arrangements.
  156.  
  157.  
  158.  ┌───────────────────────
  159.  │ PURPOSE OF THE PROGRAM ║
  160.    ═══════════════════════╝
  161.                              
  162.       EQO  is  a   replacement  for  the   DOS  ECHO  command   with  several
  163.    enhancements.  It  performs the same  basic function as  the ECHO command,
  164.    which is to print, or "echo,"  text to the screen.  The difference is that
  165.    EQO supports several special codes which  can be typed on the command line
  166.    to modify the program's  output.  Most of these codes  are the same as the
  167.    dollar-sign codes supported by the  PROMPT command.  In addition to those,
  168.    I have added several other codes that I thought would be useful.
  169.  
  170.  
  171.  
  172.    ──────────────────────────────────────────────────────────────────────────
  173.    EQO version 1.0 - by Jeremy Sawicki               THE SHAREWARE CONCEPT  3
  174.    ──────────────────────────────────────────────────────────────────────────
  175.  
  176.  
  177.  
  178.       The original reason  for writing this program  stems from the inability
  179.    of DOS to  perform several  simple tasks  which I thought  were important.
  180.    First,  DOS provides  no means  of sending  ANSI escape  sequences to  the
  181.    screen.  (ANSI escape sequences are  special codes which, when sent to the
  182.    screen, can cause  special effects  such as moving the  cursor or changing
  183.    the colors of printed text.   A driver such as  ANSI.SYS must be installed
  184.    for  these to  work properly.)   Second, when  using the  ECHO command  to
  185.    display  text on  the screen  from batch  files,  a blank  line cannot  be
  186.    printed  by giving  the  ECHO  command  with  no parameters,  as  might be
  187.    expected.  Finally, the ECHO command  always outputs a carriage return and
  188.    line feed after it prints  out its text, which at times I have found to be
  189.    undesirable.   For these  reasons,  I thought  that a  replacement  to the
  190.    standard ECHO command would be useful.
  191.  
  192.                                              
  193.  ┌────────────
  194.  │ QUICK START ║
  195.    ════════════╝
  196.  
  197.       If you're into quick  starts, just type "EQO /?"  and you'll be on your
  198.    way in no time.
  199.  
  200.  
  201.  ┌───────────────────────
  202.  │ HOW TO USE THE PROGRAM ║
  203.    ═══════════════════════╝
  204.  
  205.       The first thing that must be done in order to use EQO effectively is to
  206.    put it in your  PATH setting so  that it can  be used from  any directory.
  207.    This can  be done in  two ways.   One is to  copy the EQO.EXE  file into a
  208.    directory already in your  PATH (such as C:\DOS).   Alternatively, you can
  209.    add the directory in which EQO resides to your current path setting.  This
  210.    is usually done by modifying the  PATH line in your AUTOEXEC.BAT file.  If
  211.    your current path line in AUTOEXEC.BAT looks like
  212.  
  213.          SET PATH=C:\DOS;C:\;C:\UTILS
  214.  
  215.    you should change it to something like
  216.  
  217.          SET PATH=C:\DOS;C:\EQO;C:\;C:\UTILS
  218.  
  219.    and then restart your computer so that the change will take effect.
  220.  
  221.       Once EQO is in your path, you  can run it on the command line or from a
  222.    batch file using the following format
  223.  
  224.          EQO [message]
  225.  
  226.    where [message]  is anything  that is  to be  echoed to  the screen.   For
  227.    example, typing
  228.  
  229.  
  230.    ──────────────────────────────────────────────────────────────────────────
  231.    EQO version 1.0 - by Jeremy Sawicki              PURPOSE OF THE PROGRAM  4
  232.    ──────────────────────────────────────────────────────────────────────────
  233.  
  234.  
  235.  
  236.          EQO Hello, world!
  237.   
  238.    will print the message "Hello, world!" on the screen (without the quotes).
  239.    This is exactly what the standard ECHO command does.
  240.  
  241.       EQO also accepts  special commands or codes  as part of [message] which
  242.    change what  is printed  on the  screen.   See the  next section  (Special
  243.    Codes) for a description of how to use these codes.
  244.  
  245.  
  246.  ┌──────────────
  247.  │ SPECIAL CODES ║
  248.    ══════════════╝
  249.  
  250.       While most characters  typed on the  command line are  simply echoed to
  251.    the  screen,  EQO  reserves the  dollar  sign  ($) for  special  purposes.
  252.    Whenever a dollar sign  is typed on the command line,  EQO assumes that it
  253.    is part of  a special code  which changes  the behavior or  output of EQO.
  254.    These codes allow EQO to provide features which are not available with the
  255.    standard DOS ECHO command.   (Note that these codes are not case sensitive
  256.    - upper and lower case are both  accepted.)  Following is a description of
  257.    each special code supported, as well as how each is used.
  258.  
  259.  
  260.  $$    Dollar sign  ($)
  261.  ──────────────────────
  262.  
  263.       The $$ command simply echoes a single dollar sign to the screen.  Since
  264.    the dollar sign is used as part of these special codes, it is necessary to
  265.    use two of them together in order to print a single dollar sign.
  266.  
  267.  
  268.  $G    Greater-than sign  (>)
  269.  ────────────────────────────
  270.  
  271.       The $G command echoes a greater-than sign (>) to the screen.  Since the
  272.    greater-than sign is  used by DOS for piping,  it cannot be printed on the
  273.    screen using the normal ECHO command.  This option provides a way of using
  274.    the greater-than sign in printed text.
  275.  
  276.  
  277.  $L    Less-than sign  (<)
  278.  ─────────────────────────
  279.  
  280.       The $L command echoes  a less-than sign (<)  to the screen.   Since the
  281.    less-than  sign is used  by DOS for  piping, it  cannot be printed  on the
  282.    screen using the normal ECHO command.  This option provides a way of using
  283.    the less-than sign in printed text.
  284.  
  285.  
  286.  
  287.  
  288.    ──────────────────────────────────────────────────────────────────────────
  289.    EQO version 1.0 - by Jeremy Sawicki                       SPECIAL CODES  5
  290.    ──────────────────────────────────────────────────────────────────────────
  291.  
  292.  
  293.  
  294.  $B    Pipe symbol  (|)
  295.  ──────────────────────
  296.    
  297.       The $B  command  echoes  a pipe  symbol  (|), or  vertical bar,  to the
  298.    screen.  Since this symbol is used by DOS for piping, it cannot be printed
  299.    on the screen using  the normal ECHO command.   This option provides a way
  300.    of using the pipe symbol in printed text.
  301.  
  302.  
  303.  $Q    Equal sign  (=)
  304.  ─────────────────────
  305.  
  306.       The $Q command echoes an equal  sign (=) to the screen.  This option is
  307.    not particularly useful,  since the equal sign can  simply be typed on the
  308.    command line, but it has been retained  for compatibility with the dollar-
  309.    sign commands used by the PROMPT statement.
  310.  
  311.  
  312.  $T    Current time
  313.  ──────────────────
  314.  
  315.       The $T command  echoes the current  system time  to the screen,  in the
  316.    same format used in the DOS prompt.  For example, typing
  317.  
  318.          EQO $T
  319.  
  320.    at 22.35 seconds after 6:30pm would display
  321.  
  322.          18:30:22.35
  323.  
  324.    on the screen.
  325.  
  326.  
  327.  $D    Current date
  328.  ──────────────────
  329.  
  330.       The $D command  echoes the current  system date  to the screen,  in the
  331.    same format used in the DOS prompt.  For example, typing
  332.  
  333.          EQO $D
  334.  
  335.    on July 6, 1994, would display
  336.  
  337.          Wed 07-06-1994
  338.  
  339.    on the screen.
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.    ──────────────────────────────────────────────────────────────────────────
  347.    EQO version 1.0 - by Jeremy Sawicki                       SPECIAL CODES  6
  348.    ──────────────────────────────────────────────────────────────────────────
  349.  
  350.  
  351.  
  352.  $P    Current drive and path
  353.  ────────────────────────────
  354.  
  355.       The $P  command echoes the  current DOS drive  and path to  the screen.
  356.    For example, typing
  357.  
  358.          EQO You are currently in the $P directory
  359.  
  360.    while in the \DOS directory on drive C would display
  361.  
  362.          You are currently in the C:\DOS directory
  363.  
  364.    on the screen.
  365.    
  366.  
  367.  $N    Current drive
  368.  ───────────────────
  369.  
  370.       The $N command echoes  the current DOS drive  letter to the screen. For
  371.    example, typing
  372.  
  373.          EQO You are currently using drive $N:
  374.  
  375.    while on drive C would display
  376.  
  377.          You are currently using drive C:
  378.  
  379.    on the screen.
  380.  
  381.  
  382.  $V    DOS version number
  383.  ────────────────────────
  384.  
  385.       The $V command echoes the DOS  version number to the screen.  Note that
  386.    the version number as displayed by EQO will not  necessarily look the same
  387.    as when it is  displayed in the DOS prompt.   EQO only gives the numerical
  388.    value of the DOS version number, without any of the additional information
  389.    that PROMPT provides.   For example, if you are  using MS-DOS version 6.2,
  390.    typing
  391.  
  392.          EQO You have DOS version $V
  393.  
  394.    would display
  395.  
  396.          You have DOS version 6.20
  397.  
  398.    on the screen.
  399.  
  400.  
  401.  
  402.  
  403.  
  404.    ──────────────────────────────────────────────────────────────────────────
  405.    EQO version 1.0 - by Jeremy Sawicki                       SPECIAL CODES  7
  406.    ──────────────────────────────────────────────────────────────────────────
  407.  
  408.  
  409.  
  410.  $H    Backspace  (erase previous character)
  411.  ───────────────────────────────────────────
  412.  
  413.       The $H command echoes a backspace character,  which erases the previous
  414.    character on the  screen.  One use of  the $H command would  be to display
  415.    the current time without the hundredths of a second displayed.  This could
  416.    be done with the following command:
  417.  
  418.          EQO The current time is: $T$H$H$H
  419.  
  420.       The $T  would display,  for instance,  18:30:22.35.  Then  the three $H
  421.    commands would erase the two hundredths digits and the decimal point.  The
  422.    resulting message would look like this:
  423.  
  424.          The current time is: 18:30:22
  425.  
  426.  
  427.  $E    Escape  (ASCII code 27)
  428.  ─────────────────────────────
  429.  
  430.       The $E command echoes an escape character (ASCII code 27 decimal, or 1B
  431.    hex) to  the screen.   The primary  use of  this command  is to  send ANSI
  432.    escape  sequences to  the  screen.   If ANSI.SYS  or a  similar  driver is
  433.    installed, certain  special codes beginning  with the escape character can
  434.    be sent to the screen,  resulting in  interesting effects.   These include
  435.    changing screen colors, clearing  the screen, moving the cursor around the
  436.    screen, and many others.  Try typing the following:
  437.  
  438.          EQO $E[0;1;33;44m
  439.  
  440.       The E can be upper or  lower case, but it is  important for the m to be
  441.    lower case  for this  command to  work.  This  command changes  the screen
  442.    colors to yellow text on a blue background.  Refer to the Examples section
  443.    for a more complete explanation of how to use ANSI codes.
  444.  
  445.  
  446.  $_    Carriage return and line feed
  447.  ───────────────────────────────────
  448.  
  449.       The  $_  command  is the  equivalent  of telling  EQO to  press  Enter.
  450.    Wherever this code  occurs, EQO moves  the cursor to the  beginning of the
  451.    next line of text, making it  possible to print multi-line messages with a
  452.    single EQO command.  For example, typing
  453.  
  454.          EQO This is a$_three-line$_message!
  455.  
  456.    will display the following:
  457.  
  458.          This is a
  459.          three-line
  460.          message!
  461.  
  462.    ──────────────────────────────────────────────────────────────────────────
  463.    EQO version 1.0 - by Jeremy Sawicki                       SPECIAL CODES  8
  464.    ──────────────────────────────────────────────────────────────────────────
  465.  
  466.  
  467.  
  468.  $^    Any control character
  469.  ───────────────────────────
  470.  
  471.       The $^ command allows control  characters (those with ASCII codes up to
  472.    31) to be displayed  on the screen.   The character  immediately following
  473.    the $^ code on the command line determines which control character will be
  474.    displayed.  For example, typing
  475.  
  476.          EQO $^A
  477.  
  478.    will display a Control-A, or ASCII code 1, on the screen, which happens to
  479.    be a picture of a smiley face.  Using the command
  480.  
  481.          EQO $^G
  482.  
  483.    it is  possible to cause  the PC's internal  speaker to beep,  because the
  484.    Control-G character represents a beep.
  485.  
  486.  
  487.  $###  Any ASCII code (decimal)
  488.  ──────────────────────────────
  489.  
  490.       This command provides  a way of displaying  any character on the screen
  491.    by using its ASCII code.   Simply replace ### with a  three-digit code (in
  492.    decimal) and EQO  will display the character  with that ASCII code.  As an
  493.    example, try typing the following:
  494.  
  495.          EQO $176$177$178$219 EQO! $219$178$177$176
  496.  
  497.    This makes use of  certain shaded box  ASCII characters,  and will display
  498.    the following on the screen:
  499.  
  500.          ░▒▓█ EQO! █▓▒░
  501.  
  502.       Note that  the ASCII  code following  the dollar  sign must  be exactly
  503.    three digits long.   Shorter values must have  zeroes added to them on the
  504.    left to work properly.   This means that the proper  command for a capital
  505.    "A" is $065 and not $65.
  506.                            
  507.  
  508.  $X##  Any ASCII code (hexadecimal)
  509.  ──────────────────────────────────
  510.  
  511.       This command serves  the same purpose as the  previous one, except that
  512.    the ASCII code  is in hexadecimal  (base 16) rather than  in decimal (base
  513.    10).  Simply replace ##  with a two-digit hexadecimal  ASCII code, and EQO
  514.    will print the corresponding character to the screen.  For example, typing
  515.  
  516.          EQO a $xF2 b$xF1$xFB2
  517.  
  518.    will print the following:
  519.  
  520.    ──────────────────────────────────────────────────────────────────────────
  521.    EQO version 1.0 - by Jeremy Sawicki                       SPECIAL CODES  9
  522.    ──────────────────────────────────────────────────────────────────────────
  523.  
  524.  
  525.  
  526.          a ≥ b±√2
  527.  
  528.       Note that the  ASCII code following  the $X must be  exactly two digits
  529.    long.   A 1-digit  hexadecimal value  must have a  zero before  it for the
  530.    command to work properly.  This means that the proper command for a little
  531.    smiley face is $X01 and not $X1.
  532.  
  533.  
  534.  $;    No carriage return / line feed
  535.  ────────────────────────────────────
  536.  
  537.       The $; command  functions in a slightly  different way than the others.
  538.    It does not print anything on screen  when it appears in the command line.
  539.    It does not even matter  where in the command line  this code appears.  If
  540.    it appears SOMEWHERE in the  command line, though, EQO will not advance to
  541.    the beginning  of the next  line at  the end of  its output  as it usually
  542.    does.
  543.  
  544.       One use  of this would  be to give  two consecutive  EQO commands  in a
  545.    batch file,  with the  output of  both appearing  on the  same line.   For
  546.    example, these two lines in a batch file
  547.  
  548.          EQO This message will be $;
  549.          EQO displayed on one line.
  550.  
  551.    would produce the following result:
  552.  
  553.          This message will be displayed on one line.
  554.  
  555.       This  is  particularly  useful  with EQO  commands  using  ANSI  escape
  556.    sequences.   These ANSI  codes  typically take  up a lot  of space  on the
  557.    command line  without producing  a comparable  amount of output,  so it is
  558.    often desirable to split them up into several lines.
  559.  
  560.  
  561.  ┌─────────
  562.  │ EXAMPLES ║
  563.    ═════════╝
  564.  
  565.       This section  provides some  examples of ways  of using EQO.   I'm sure
  566.    there are many more, but these are some of the ones that I find useful.
  567.  
  568.  
  569.  DOS Piping Capabilities
  570.  ───────────────────────
  571.  
  572.       As with the standard ECHO command,  the output of EQO may be piped into
  573.    a file or another program.  The command
  574.  
  575.          EQO Hello! > HELLO.TXT
  576.  
  577.  
  578.    ──────────────────────────────────────────────────────────────────────────
  579.    EQO version 1.0 - by Jeremy Sawicki                      SPECIAL CODES  10
  580.    ──────────────────────────────────────────────────────────────────────────
  581.  
  582.  
  583.  
  584.    creates a file called HELLO.TXT with the word "Hello!" in it.
  585.  
  586.       As a simple example of  piping the output of  EQO into another command,
  587.    this changes the system time to 10:00 a.m. with a single command:
  588.  
  589.          EQO 10:00 | TIME
  590.  
  591.       Of course,  these are trivial  examples, but the  ability to use piping
  592.    can be quite helpful at times.
  593.  
  594.  
  595.  Keeping a Log File
  596.  ──────────────────
  597.  
  598.       Using the  time and date  capabilities of  EQO it would  be possible to
  599.    keep a log of when certain events occur.  For instance, placing the line
  600.  
  601.          EQO $D  $T  Word processor invoked. >> C:\LOGFILES\USAGELOG.TXT
  602.  
  603.    in a batch file which runs a word processor would cause a line similar to
  604.  
  605.          Wed 07-06-1994  18:30:22.35  Word processor invoked.
  606.  
  607.    to be placed at the  end of a file called USAGELOG.TXT  in the C:\LOGFILES
  608.    directory whenever the word processor is used.
  609.  
  610.       Creativity can probably find  many other, possibly more practical, uses
  611.    for the $D and $T codes as well.
  612.  
  613.  
  614.  Using ANSI Codes
  615.  ────────────────
  616.  
  617.       With the $E command, EQO makes it possible to use ANSI escape sequences
  618.    (often called ANSI codes) to produce a variety of special effects.  First,
  619.    in order to make  these work properly,  an ANSI driver  must be installed.
  620.    This is usually  done by including a  command similar to  the following in
  621.    the CONFIG.SYS file:
  622.  
  623.          DEVICE=C:\DOS\ANSI.SYS
  624.  
  625.       Once an ANSI driver is  installed, ANSI codes  sent to the screen using
  626.    EQO can be interpreted  properly.  All of  these ANSI codes  start with an
  627.    escape character (ASCII code 27)  followed by a left  bracket ("[").  When
  628.    sending ANSI codes from EQO, the escape  character is typed on the command
  629.    line as  $E.  Using  this notation,  here is a list  of some of  the codes
  630.    supported by ANSI drivers.
  631.  
  632.  
  633.  
  634.  
  635.  
  636.    ──────────────────────────────────────────────────────────────────────────
  637.    EQO version 1.0 - by Jeremy Sawicki                           EXAMPLES  11
  638.    ──────────────────────────────────────────────────────────────────────────
  639.  
  640.  
  641.  
  642.          $E[2J      Erase screen and home cursor
  643.          $E[K       Erase to end of line
  644.          $E[A       Cursor up one row
  645.          $E[B       Cursor down one row
  646.          $E[C       Cursor right one column
  647.          $E[D       Cursor left one column
  648.          $E[##A     Cursor up ## rows
  649.          $E[##B     Cursor down ## rows
  650.          $E[##C     Cursor right ## columns
  651.          $E[##D     Cursor left ## columns
  652.          $E[##;@@f  Cursor to row ##, column @@
  653.          $E[s       Save cursor position
  654.          $E[u       Restore cursor position
  655.  
  656.       Most of these codes are  fairly self-explanatory.   Wherever the ## and
  657.    @@ occur, replace them with the required data.  The $E[s command saves the
  658.    current cursor position somewhere  in memory, and the $E[u command returns
  659.    the cursor to  the most-recently  saved position.   One important thing to
  660.    note is that while the $E  may have a capital or  small E, it is important
  661.    for the rest of the codes to be typed  EXACTLY as shown, capital or lower-
  662.    case as needed.  EQO is not picky, but ANSI drivers are.
  663.  
  664.       For  examples  of using  some more  complex ANSI  codes,  see "Changing
  665.    Colors" and "Redefining Keys" below.
  666.  
  667.  
  668.  Changing Colors (ANSI)
  669.  ──────────────────────
  670.  
  671.       Another feature available through ANSI drivers is the ability to change
  672.    the colors of text on the  screen.  This is done  with an ANSI code of the
  673.    following format:
  674.  
  675.          $E[##;##;...;##m
  676.  
  677.    There can be several  ##'s in this command,  separated by semi-colons, and
  678.    terminated by a lower-case M.
  679.  
  680.       Following is a list of  numbers that set text  attributes and generally
  681.    function for both monochrome and color screens:
  682.  
  683.          0   Reset to normal (light gray on black)
  684.          1   Bold (high intensity)
  685.          4   Underline (monochrome only)
  686.          5   Blinking
  687.          7   Reverse video (black on light gray)
  688.          8   Invisible (black on black)
  689.  
  690.       These numbers change the colors of printed text:
  691.  
  692.  
  693.  
  694.    ──────────────────────────────────────────────────────────────────────────
  695.    EQO version 1.0 - by Jeremy Sawicki                           EXAMPLES  12
  696.    ──────────────────────────────────────────────────────────────────────────
  697.  
  698.  
  699.  
  700.              Bold off     Bold on
  701.              ────────     ───────
  702.          30  Black        Dark Gray
  703.          31  Red          Light Red
  704.          32  Green        Light Green
  705.          33  Brown        Yellow
  706.          34  Blue         Light Blue
  707.          35  Magenta      Light Magenta
  708.          36  Cyan         Light Cyan
  709.          37  Light Gray   White
  710.  
  711.       These numbers change the color of the background behind the text:
  712.  
  713.          40  Black
  714.          41  Red
  715.          42  Green
  716.          43  Brown
  717.          44  Blue
  718.          45  Magenta
  719.          46  Cyan
  720.          47  Light Gray
  721.  
  722.       By stringing several  of these codes  together in the  right way, it is
  723.    possible  to change  colors  in many  different  ways.   For example,  the
  724.    following command simply changes  the colors to Light Gray text on a Black
  725.    background:
  726.  
  727.          EQO $E[0m
  728.  
  729.    Type the following  to change the colors  to Blinking Red  text on a Black
  730.    background:
  731.  
  732.          EQO $E[0;5;31m
  733.  
  734.    (This can  get annoying  very quickly.)   This  next command  changes  the
  735.    screen colors to Yellow on Blue (my personal favorite):
  736.  
  737.          EQO $E[0;1;33;44m
  738.  
  739.       One  important  thing to  know is  that you  don't have to  start these
  740.    color-changing commands with a "0" to  reset the colors.  However, several
  741.    of the text attributes  (numbers 1-8) cannot be undone  without completely
  742.    resetting the colors  and starting from scratch.   This is especially true
  743.    for the attributes of Bold, Underline, and Blinking.  For instance, if you
  744.    are working  with Blinking Light  Blue letters on a  Light Gray background
  745.    and you  want  to turn  off blinking,  you  must  start  from  scratch and
  746.    reselect the colors as follows:
  747.  
  748.          EQO $E[0;1;34;47m  No Blink  $E[5m  Blink  $E[0;1;34;47m  No Blink
  749.  
  750.  
  751.  
  752.    ──────────────────────────────────────────────────────────────────────────
  753.    EQO version 1.0 - by Jeremy Sawicki                           EXAMPLES  13
  754.    ──────────────────────────────────────────────────────────────────────────
  755.  
  756.  
  757.  
  758.       These color-changing ANSI codes can  be used for several purposes.  One
  759.    is to add emphasis to  messages printed from batch  files.  This in itself
  760.    provides  many  possibilities.   Another  use  is to  add a  line  to your
  761.    AUTOEXEC.BAT file  which changes your  screen colors to  whatever you like
  762.    them to  be in  DOS.   It may  also  be  helpful to  create  a batch  file
  763.    containing a single EQO  command to do this,  because some programs have a
  764.    habit of altering the screen colors,  and you can then run that batch file
  765.    whenever necessary to change them back.
  766.    
  767.  
  768.  Redefining Keys (ANSI)
  769.  ──────────────────────
  770.  
  771.       Yet another feature provided by ANSI drivers is the ability to redefine
  772.    keys to perform other functions.   This is most useful for redefining keys
  773.    which are not normally  used in DOS (such  as function keys)  so that they
  774.    act as macros or typing aids for commonly typed commands.  (Note that some
  775.    ANSI drivers do not support this feature.   Try one of the examples to see
  776.    if yours does.)
  777.  
  778.       To start with, here is an example of how a key might be redefined:
  779.  
  780.          EQO $E[0;68;"dir";13p
  781.  
  782.    This command looks cryptic,  but what it does is simple:  it redefines the
  783.    F10 key to type "dir" and press Enter.   The $E[ is the standard beginning
  784.    for all ANSI codes.   The 0 and the  68 together specify  that the F10 key
  785.    will be  redefined - this  will be  explained  more later.   The  "dir" in
  786.    quotes is  the new  definition of  the F10 key,  and the 13  (which is the
  787.    ASCII code for Enter) specifies that the  F10 key should simulate pressing
  788.    the Enter key as well as typing dir.  The letter p  at the end, which must
  789.    be lower  case, tells  the ANSI  driver  that you  are  finished  with the
  790.    command.
  791.  
  792.       With key  redefinition  commands, the  first number  after the  bracket
  793.    determines which key will be redefined, unless it is a zero, in which case
  794.    the second number determines  this.  If the first number  is non-zero, the
  795.    key to be  redefined is  simply the  key having  that ASCII code.   If the
  796.    first number is  zero, however,  the second number  refers to an "extended
  797.    code" which tells which  key to redefine.  The  following chart lists many
  798.    extended codes and their corresponding keys:
  799.  
  800.          15           Shift  Tab
  801.          16 to 25     Alt  Q, W, E, R, T, Y, U, I, O, P
  802.          30 to 38     Alt  A, S, D, F, G, H, J, K, L
  803.          44 to 50     Alt  Z, X, C, V, B, N, M
  804.          59 to 68     F1 to F10
  805.          71           Home
  806.          72           Up Arrow
  807.          73           PgUp
  808.          75           Left Arrow
  809.  
  810.    ──────────────────────────────────────────────────────────────────────────
  811.    EQO version 1.0 - by Jeremy Sawicki                           EXAMPLES  14
  812.    ──────────────────────────────────────────────────────────────────────────
  813.  
  814.  
  815.  
  816.          77           Right Arrow
  817.          79           End
  818.          80           Down Arrow
  819.          81           PgDn
  820.          82           Ins
  821.          83           Del
  822.          84 to 93     Shift  F1 to F10
  823.          94 to 103    Ctrl  F1 to F10
  824.          104 to 113   Alt  F1 to F10
  825.          114          Ctrl  PrtSc
  826.          115          Ctrl  Left Arrow
  827.          116          Ctrl  Right Arrow
  828.          117          Ctrl  End
  829.          118          Ctrl  PgDn
  830.          119          Ctrl  Home
  831.          120 to 131   Alt  1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =
  832.          132          Ctrl  PgUp
  833.  
  834.       After specifying which key to redefine, the rest of the code tells what
  835.    exactly to redefine it to.   Plain ASCII text can be  used by enclosing it
  836.    in quotes,  as with "dir"  in the  example above.   Special keys,  such as
  837.    Enter,  can be  referenced  by their  ASCII codes.   When all this  is put
  838.    together correctly, the appropriate key  takes on a whole new meaning when
  839.    used at the DOS prompt.
  840.  
  841.       As another example, this command redefines the Alt-R key combination to
  842.    change to the root directory:
  843.  
  844.          EQO $E[0;19;"cd\";13p
  845.  
  846.       To make these key redefinitions  easier to use, it is helpful to make a
  847.    batch  file  which  contains  all the  redefinitions  you frequently  use.
  848.    Alternatively,  place these  commands  in your  AUTOEXEC.BAT file  so they
  849.    automatically take effect each time you boot your computer.
  850.  
  851.       Note:   EQO ordinarily  advances  to the  next line  at the end  of its
  852.    output.  When giving key redefinition commands from a batch file, this may
  853.    produce unwanted  blank lines.  To avoid  this, append the  $; code to the
  854.    end of each line.
  855.  
  856.  
  857.  ┌───────────
  858.  │ FINAL WORD ║
  859.    ═══════════╝
  860.  
  861.       Well, this is it - my first attempt  at writing a shareware program.  I
  862.    hope that  someone other  than myself  finds it  useful.  Even if  not, at
  863.    least now I have the program to use for myself.
  864.  
  865.  
  866.  
  867.  
  868.    ──────────────────────────────────────────────────────────────────────────
  869.    EQO version 1.0 - by Jeremy Sawicki                           EXAMPLES  15
  870.    ──────────────────────────────────────────────────────────────────────────
  871.  
  872.  
  873.  
  874.       And  now I  will  make one  last  appeal  for  money:  If you  use  EQO
  875.    regularly and find it  useful, why not send me  a donation for my efforts?
  876.    I can always use  the extra help,  and it will help  encourage me to write
  877.    other programs in the future.  Once again, here is the address where I can
  878.    be reached:
  879.  
  880.          Jeremy Sawicki
  881.          523 Kapity Dr.
  882.          Mogadore, OH  44260-9534
  883.  
  884.    Or, by Internet e-mail:
  885.  
  886.          at869@cleveland.freenet.edu  (preferred)
  887.          jsawicki@nyx.cs.du.edu       (alternate)
  888.          71321.3301@compuserve.com    (alternate)
  889.  
  890.       And one final request:   Help spread this program around.  Upload it to
  891.    electronic  bulletin boards,  online services,  and anywhere else  you can
  892.    think of.  Thanks!
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.    ──────────────────────────────────────────────────────────────────────────
  927.    EQO version 1.0 - by Jeremy Sawicki                         FINAL WORD  16
  928.    ──────────────────────────────────────────────────────────────────────────
  929.  
  930.